const mysql = require('mysql2');

module.exports = (req,res,next)=>{
  const conn = mysql.createConnection({
    host:'127.0.0.1',
    port:'3306',
    user:'root',
    password:'',
    database:'lcf172'
  });
  req.db = conn.promise()
  next();
}